package com.example.library.util;


import ohos.agp.components.Image;
import ohos.app.Context;

public class ImageLoadFactory {
  private static ImageLoadFactory instance;

  public static ImageLoadFactory getInstance() {
    if (instance == null) {
      synchronized (ImageLoadFactory.class) {
        if (instance == null) {
          instance = new ImageLoadFactory();
        }
      }
    }
    return instance;
  }

  private ImageLoadClient mClient;

  public void setImageClient(ImageLoadClient client) {
    mClient = client;
  }

  public void loadImage(Image imageView, Object obj, Context context) {
    mClient.loadImage(imageView, obj, context);
  }

}
